//
//// MARK: - Class
//
//public final class HDClass: Object {
//    /// uid|用户名|String|- -|20135081||
//    dynamic var uid: String?
//    /// schoolYear|学年|String|- -|2015-2016学年||
//    dynamic var schoolYear: String?
//    /// term|学期|String|- -|第一学期||
//    dynamic var term: String?
//    /// cid|课程号|String|- -|1412018028||
//    dynamic var cid: String?
//    /// cname|课程名|String|- -|科技英语||
//    dynamic var cname: String?
//    /// period|课时|int|0|1课时为1节课||
//    dynamic var period: String?
//    /// credit|学分|float|0.0|4.0|学分为浮点数|
//    dynamic var credit: String?
//    /// startSection|开始节次|int|1|1:第一节课|索引从 1 开始|
//    dynamic var startSection: String?
//    /// endSection|结束节次|int|1|2:第二节课|上课时间 = (结束节次 - 开始节次) + 1|
//    dynamic var endSection: String?
//    /// startWeek|开始周次|int|1|1:课程开始周次|索引从 1 开始|
//    dynamic var startWeek: String?
//    /// endWeek|结束周次|int|1|18:课程结束周次|最大值为18|
//    dynamic var endWeek: String?
//    /// dayOfWeek|周几|int|1|1:星期一|一周的开始是星期一,索引从 1 开始|
//    dynamic var dayOfWeek: String?
//    /// classroom|教室|String|- -|1 号楼 202||
//    dynamic var classroom: String?
//    ///teacher|教师|String|- -|张彦俊||
//    dynamic var teacher: String?
//    /// campus|校区|String|- -|校本部||
//    dynamic var campus: String?
//    /// studyType|修读类型|String|正常|正常|正常，免听|
//    dynamic var studyType: String?
//    /// studyMethod|修读方式|String|初修|初修|初修，重修|
//    dynamic var studyMethod: String?
//    
//    public convenience init(dictionary: NSDictionary) {
//        self.init()
//        uid = dictionary["uid"] as? String
//        schoolYear = dictionary["schoolYear"] as? String
//        term = dictionary["term"] as? String
//        cid = dictionary["cid"] as? String
//        cname = dictionary["cname"] as? String
//        period = "\(dictionary["period"] as? String)"
//        credit = "\(dictionary["credit"] as! Double)"
//        startSection = "\(dictionary["startSection"] as! Int)"
//        endSection = "\(dictionary["endSection"] as! Int)"
//        startWeek = "\(dictionary["startWeek"] as! Int)"
//        endWeek = "\(dictionary["endWeek"] as! Int)"
//        dayOfWeek = "\(dictionary["dayOfWeek"] as! Int)"
//        classroom = dictionary["classroom"] as? String
//        teacher = dictionary["teacher"] as? String
//        campus = dictionary["campus"] as? String
//        studyType = dictionary["studyType"] as? String
//        studyMethod = dictionary["studyMethod"] as? String
//    }
//    
//    public class func classInfoArrayWithJsonArray(array: NSArray) -> [HDClass] {
//        var classInfoArray = Array<HDClass>()
//        for dict in array {
//            let classInfo = HDClass(dictionary: dict as! NSDictionary)
//            classInfoArray.append(classInfo)
//        }
//        
//        return classInfoArray
//    }
//    
//    public func inCurrentWeek(week: Int) -> Bool {
//        let startWeekInt = Int(startWeek!)!
//        let endWeekInt = Int(endWeek!)!
//        
//        if startWeekInt <= week && week <= endWeekInt {
//            return true
//        }
//        return false
//    }
//    
//    private let ClassTimeDictionary = ["1":"8:00", "1-":"8:50",
//                                       "2":"9:00", "2-":"9:50",
//                                       "3":"10:20", "3-":"11:10",
//                                       "4":"11:20", "4-":"12:10",
//                                       "5":"13:30", "5-":"14:20",
//                                       "6":"14:30", "6-":"15:20",
//                                       "7":"15:40", "7-":"16:30",
//                                       "8":"16:40", "8-":"17:30",
//                                       "9":"18:30", "9-":"19:20",
//                                       "10":"19:25", "10-":"20:15",
//                                       "11":"20:20", "11-":"21:10"]
//
//    private let WeekDayDictionary = ["1":"周一",
//                                     "2":"周二",
//                                     "3":"周三",
//                                     "4":"周四",
//                                     "5":"周五",
//                                     "6":"周六",
//                                     "7":"周日",]
//    
//    /**
//     返回 "11:20-12:10"
//     */
//    private func timeSectionString() -> String {
//        let startTimeString = ClassTimeDictionary[startSection!]!
//        let endTimeString = ClassTimeDictionary["\(endSection!)-"]!
//        return startTimeString + "~" + endTimeString
//    }
//
//    /**
//     返回 "周一 7~9 节\n 11:20-12:10"
//     */
//    private func timeString() -> String {
//        let weekString = WeekDayDictionary[dayOfWeek!]!
//        return "\(weekString) \(startSection!)~\(endSection!) 节\n\(timeSectionString())"
//    }
//
//    public func detailInfo() -> String {
//        let info = "课程名\n\(cname!)\n\n教室\n\(classroom!)\n\n教师\n\(teacher!)\n\n时间\n\(timeString())\n\n周数\n \(startWeek!)~\(endWeek!) 周"
//        return info
//    }
//}
//

//
//// MARK: - Exam
//public final class HDExam: Object {
//    ///    uid	用户名	String	- -	20135081
//    dynamic var uid: String?
//    ///    cid	课程号	String	- -	1412018041
//    dynamic var cid: String?
//    ///    cname	课程名	String	- -	科技英语
//    dynamic var cname: String?
//    ///    property	课程性质	String	- -	必修	可选值：必修课，选修课
//    dynamic var property: String?
//    ///    teacher	教师	String	- -	李春源
//    dynamic var teacher: String?
//    ///    credit	学分	float	0.0	4.0	学分为浮点型
//    dynamic var credit: String?
//    ///    date	考试日期	String	- -	2015-09-22	暂定为 String 类型
//    dynamic var date: String?
//    ///    time	考试时间	String	- -	19:55-21:55	暂定为 String 类型
//    dynamic var time: String?
//    ///    classroom	考试教室	String	- -	汇文楼-432
//    dynamic var classroom: String?
//    ///    type	考试类型	String	- -	闭卷	可选值：闭卷，开卷
//    dynamic var type: String?
//    ///    method	考试方式	String	- -	笔试	可选值：笔试，机试
//    dynamic var method: String?
//    ///    status	考试状态	Stirng	- -	已结束	可选值：未开始，已结束，安排中，进行中
//    dynamic var status: String?
//    
//    public convenience init(dictionary: NSDictionary) {
//        self.init()
//        uid = dictionary["uid"] as? String
//        cid = dictionary["cid"] as? String
//        cname = dictionary["cname"] as? String
//        property = dictionary["property"] as? String
//        teacher = dictionary["teacher"] as? String
//        credit = "\(dictionary["credit"] as? Double)"
//        date = dictionary["date"] as? String
//        time = dictionary["time"] as? String
//        classroom = dictionary["classroom"] as? String
//        type = dictionary["type"] as? String
//        method = dictionary["method"] as? String
//        status = dictionary["status"] as? String
//    }
//    
//    public class func examArrayWithJsonArray(array: NSArray) -> [HDExam] {
//        var examArray = Array<HDExam>()
//        for dict in array {
//            let exam = HDExam(dictionary: dict as! NSDictionary)
//            examArray.append(exam)
//        }
//        
//        return examArray
//    }
//